﻿@using Mysoft.ModelAnalysis.Models

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/bootstrap.js"></script>
    <title>实体对比</title>
</head>
<body>
    <div style="width: 600px;">

        @{
            foreach (EntityComperResult entityComperResult in @ViewData.Model)
            {
                <div class="panel panel-default" style="margin-bottom: 0px;">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion" href="#@entityComperResult.Name">
                                @entityComperResult.Name
                            </a>
                            <div style="float:right;">@{ var type = entityComperResult.IsExists ? "存在差异" : "不存在对应的元数据";@type}</div>
                        </h4>

                    </div>
                    <div id="@entityComperResult.Name" class="panel-collapse collapse">
                        @{
                            foreach (var attributeName in entityComperResult.EntityMoreAttribute)
                            {
                                <div class="panel-body" style="padding: 10px 20px 10px 40px">
                                    @attributeName
                                    <label style="float:right;">对应的元数据属性不存在</label>
                                </div>
                            }
                            foreach (var attributeName in entityComperResult.MetadataMoreAttribute)
                            {
                                <div class="panel-body" style="padding:  10px 20px 10px 40px">
                                    @attributeName
                                <label style="float:right;">对应的对象属性不存在</label>
                            </div>
                            }
                        }

                    </div>
                </div>
                            }
        }
    </div>
</body>
</html>
